using System;
using System.Collections.Generic;
using System.Text;

namespace TK3DSim.Other
{
    public class Location
    {
        private  double _X;
        private double _Y;

        public Location(string XY)
        {
            int iNO = XY.IndexOf(":");
            _X = Convert.ToDouble(XY.Substring(0, iNO));
            _Y=Convert.ToDouble(XY.Substring(iNO+1));
        }


        public Location()
        {
            _X = 0; _Y = 0;
        }

        public Location Clone()
        {
            Location loc = new Location(this.ToString());
            return loc;
        }
        public double X
        {
            get { return _X; }
            set { _X = value; }
        }

        public double Y
        {
            get { return _Y; }
            set { _Y = value; }
        }

        public override string ToString()
        {
            return _X.ToString()+":"+_Y.ToString();
        }
    }
}
